home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
os2
/
srefv12i.zip
/
sreflogs.doc
< prev
next >
Wrap
Text File
|
1997-03-23
|
14KB
|
328 lines
05 Mar 1997: Configuring the SRE-Filter Common-Log Audit File
A) Introduction
In keeping with http server standards, SRE-Filter will maintain a
common-log format audit file.
Besides offering a compact synopsis, a number of tools exist to help you
analyze common-log files. Furthermore, as an adjunct to the common-log audit
file, SRE-Filter can also record the browser used by each request (as
well as the referer) in seperate log files.
This document discusses how to modify the SREFLOGS.INI file. SREFLOGS.INI
contains the configuration options for these three log files. These
options include the host-specific (and port-specfic) filenames for
these log files, audit-suppression instructions, and a few display options.
At this moment, there is no SRE-Filter configurator for SREFLOGS.INI --
you'll have to use your favorite text editor. Also note that, as
with most other SRE-Filter configuration files, you can change it
on the fly (SRE-Filter checks SREFLOGS.INI about every 20 seconds).
-------------------------------------------------
B) Basic configuration
A few basic points:
i) If you want to record information to these audit files, you need to
enable the WRITE_LOGS parameter (you can use the configurator to do this).
ii) If you are running a single-host server on port 80, and you
are happy to record all requests in a standard fashion, then you can
use the default version of SREFLOGS.INI.
If you choose to do this, three files in the DATA\ directory
of the GoServe "working directory" (say, D:\GOSERVE\DATA)
will be created (and written to):
* COMMON.LOG -- the common-log audit file
* BROWSERS.LOG -- list of browsers
* REFERER.LOG -- list of referers
iii) If post-filter processing has been suppressed (say, with the SEL-specific
NO_POSTFILTER permission), the request will not be recorded to these
audit files.
iv) Advanced options: SRE-Filter will "lazy write" the audit files (about
once a minute). SRE-Filter will also warn you (via the PMPRINTF
window) when a log file gets large (greater then 1M). You can
change these limits by editing the POSTFCHK.RXX file.
-------------------------------------------------
C) Configuration options
Configuration is accomplished by setting variables in SREFLOGS.INI.
The following lists the variables, with details below:
COMMONLOG == Default common-log file
COMMONLOG.nnn == Common-log file for port nnn server.
COMMONLOG.hostn == Common-log file for the "hostn" host.
COMMONLOG.hostn.nnn == Common-log file for the "hostn" host on port nnn.
BROWSERLOG == Default browser log file
BROWSERLOG.nnn == Browser log file for port nnn server.
BROWSERLOG.hostn == Browser log file for the "hostn" host.
BROWSERLOG.hostn.nnn == Browser log file for the "hostn" host on port nnn.
REFERERLOG == Default referer log file
REFERERLOG.nnn == Referer log file for port nnn server.
REFERERLOG.hostn == Referer log file for the "hostn" host.
REFERERLOG.hostn.nnn == Referer log file for the "hostn" host on port nnn.
NOOPTIONS == Do not record the portion of the request selector
following the ?
NOHTTP == Do not record the HTTP/1.0 portion of the request
string
NOCODES == List of "return codes" to not record.
NOUSER == List of IP addresses, and SRE-Filter "usernames", to
not record
NOREFERER == List of IP addresse to not record in REFERER.LOG
(COMMON and BROWSER logs do NOT pay attention to
this parameter).
NOURL.1 == Stem variable of request selectors to not record
NORUL.2
..
C.1) Configuration Details: COMMONGLOG, BROWSERLOG and REFERERLOG ----
The COMMONLOG, BROWSERLOG, and REFERERLOG "stem" variables all have the same
structure. The basic notion is that SRE-Filter will take the server port, and
the server's host nickname, and attempt to find matching COMMONLOG (and
BROWSERLOG and REFERERLOG) variables. If a match is not found, the "default"
variables are used.
You should set these stem variable to equal filenames. If you use a
relative file name (i.e.; FOO.BAR or DIR1/FOO.BAR), the file is
assumed to be relative to the DATA\ subdirectory of the GoServe
working directory.
Some examples should help. These examples use COMMONLOG,
but the logic is exactly the same for BROWSERLOG and REFERERLOG.
For these examples, assume the following entries in SREFLOGS.INI
(also assume that the DATA\ subdirectory is D:\GOSERVE\DATA)
COMMONLOG='COMMON.LOG'
COMMONLOG.CIRCUS.8080='CIRCUS\COMMON.8080'
COMMONLOG.ZOO='D:\CIRCUS\WWW\COMMON.LOG'
Example 1: if the server is a single host (no host nicknames specified)
on the standard port (80), then SRE-Filter would look for:
COMMONLOG.80 -- this is the first variable looked for
COMMONLOG -- the default
Since COMMONLOG.80 was not specified, COMMONLOG is used (which yields a
value of D:\GOSERVE\DATA\COMMON.LOG).
Note that this example also applies to non-standard ports on single
host systems (with the .80 changed appropriately).
Example 2: port 80, host nickname of ZOO:
COMMONLOG.ZOO.80 -- this is the first variable looked for
COMMONLOG.ZOO -- this is the second variable looked for
COMMONLOG -- this is the default
COMMONLOG.ZOO.80 was not specified, but COMMONLOG.ZOO was. Thus,
the value will be D:\CIRCUS\WWW\COMMON.LOG.
Example 3: port 8080, "host nickname" of CIRCUS:
COMMONLOG.CIRCUS.8080 -- this is the first variable looked for
COMMONLOG.CIRCUS -- this is the second variable looked for
COMMONLOG -- this is the default
Since COMMONLOG.CIRCUS.8080 exists; so the value will be
D:\GOSERVE\DATA\CIRCUS\COMMON.8080 (D: must be an HPFS drive).
If the desired default is to not record, set COMMONLOG=0. Note that
you can override this default on a host-nickname/port specific basis.
As stated above, the BROWSERLOG and REFERERLOG variables are treated the
same way. Thus, to suppress the REFERERLOG, set REFERLOG=0 (and have
no other REFERERLOG. variables).
C.2) The NOxxx options --------------------------------------
The followings options allow you to modify the output to the common-log file,
and to suppress the recording of selected requests.
NOOPTIONS:
If NOOPTIONS=1, then the portion of the request selector following a ?
will not be included. Since this can be quite long (as when you are
using the GET method in an HTML FORM), inclusion of this information can
lead to very long (and hard to read) entries.
For example: given a request for: /LOOK1?arg1=sub1/&arg2=1&argx=1&xmac=0
if NOOPTIONS=1, the "request" portion of the common-log (and
referers log) will be /LOOK1
NOHTTP
Technically, a request string should end with the HTTP version.
Since this is almost always HTTP/1.0, and since it's not clear that
the common-log format requires this information, you can suppress this
portion of the request string by setting NOHTTP=1.
NOCODES
NOCODES should contain a space delimited list of 3 digit
"return status codes" that you do NOT want to record. For example,
you may not be interested in requests that generated a "authorization
response" (a 401 response). If so, set:
NOCODES='401 '
If you are also uninterested in "moved" responses, you can set:
NOCODES='401 301 302 '
And if you are sort of perverse, and are not interested in normal
responses, you can set:
NOCODES='200 '
If a request selector matches one of these NOCODES, then none of the log
files are written to.
NOUSER
This should contain a space delimited list of IP names (or numeric
addresses for those clients with no IP name) that you do NOT wish to record.
It can also contain "usernames" (from SRE-Filter's USERS.IN
usename/password database).
That is, requests from these addresses (and from these "users") will NOT be
recorded. One sensible use of this is to include OWNER's IP address
(since you probably don't care about requests you make to yourself), as
well as the "usernames" of the various SUPERUSERs.
Note that if you take this suggestion, you must put in the OWNER's IP
name (in contrast, the SRE-Filter OWNERS variable expects a numeric
IP address).
Example: NOUSER=' joe.bars.net *.wah.com 151.121.55.6 ADMINX '
Notes:
* you can use * as a wildcard for a field. Thus, ab.wah.com
and cd.wah.com would both match *.wah.com, but www.ef.wah.com would
NOT.
* If 151.121.55.6 has an IP name of jill.money.gov,
she would NOT match 151.121.55.6 -- 151.121.55.6 would only match
if there was NO ip name available.
* ADMINX is a possible "username" (possibly of a SUPERUSER).
* If a match to any of these NOCODES occurs, then none of the log files
are written to.
NOREFERER
This should contain a space delimited list of IP names (or numeric
addresses for those clients with no IP name) that you do NOT wish to record
in the REFERER.LOG file.
That is, requests that were refered from these addresses will NOT be
recorded in REFERER.LOG. However, these requests WILL be recorded in the
common.log and browser.log files.
Example: NOREFERER=' *.my.site.net backup.site.org '
Notes:
* you can use * as a wildcard for a field. Thus, ab.wah.com
and cd.wah.com would both match *.wah.com, but www.ef.wah.com would
NOT.
* If 151.121.55.6 has an IP name of jill.money.gov,
she would NOT match 151.121.55.6 -- 151.121.55.6 would only match
if there was NO ip name available.
NOURL.1
..
NOURL.n
The NOURL. entries should contain URLs to NOT record. That is, if a request
selector matches one of these URLs, it will NOT be recorded.
For example:
NOURL.1 = 'IMGS/*
NOURL.2 = 'BORING/TEDIOUS.HTM '
Notes:
* You can include * as a wildcard. Thus, IMGS/HORSE.GIF
matches NOURL.1, and such requests would NOT be recorded
the common-log, etc. audit files.
* These entries are NOT sensitive to host or port -- all
NOURL entries will apply to all hosts and ports (perhaps
we'll fix this up if there's enough demand).
* If a request selector matches one of these NOURL. variables, then none
of the log files are written to.
* The several SRE-Filter hit suppresion options (such as
HIT_OWNER_SUPPRESS, have NO effect on these audit files).
* \ are converted to /, and leading / are stripped.
-------------------------------------------------
D) Structure of .LOG files
i) The common-log file format -------------------
(the following description is adapted from
http://www.apache.org/docs/mod/mod_log_common.html)
The common-log file contains a separate line for each request.
A line is composed of several items (tokens) separated by spaces:
host ident authuser date request status bytes
If a token does not have a value then it is represented by a hyphen (-).
The meanings and values of these tokens are as follows:
client
The fully-qualified domain name of the client, or its IP number if the
name is not available.
ident
The identd identity information: NOT SUPPORTED BY SRE-FILTER.
authuser
The client's username, as provided in the AUTHORIZATION request header.
Note that the common-log standard suggests that "if the request was for a
password protected document, then this is the userid used in the request".
However, SRE-Filter will always include the authuser (if available), even
if the particular request did not require authorization.
date
The date and time of the request, in the following format:
date = [day/month/year:hour:minute:second zone]
where:
day = 2 digit
month = 3 letter
year = 4 digit
hour = 2 digit
minute = 2 digit
second = 2 digit
zone = (`+' | `-') 4 digit
request
The request line from the client, enclosed in double quotes
status
The three digit status code returned to the client.
bytes
The number of bytes in the object returned to the client, not including
any headers.
For example:
acl.wear.org - - [18/Mar/1996:16:24:08 -0500] "GET /SMP/HLO.HTM HTTP/1.0" 200 1251
In the above example, the HTTP/1.0 substring may not be standard (you can
suppress it by setting the NOHTTP option in SREFLOGS.INI). Also note that
-0500 corresponds to the EST offset from GMT.
ii) The BROWSERS log file ---------------------
The browsers log file has the following structure:
[date] client : user-agent
For example:
[24/Feb/1997:18:14:30 -0500] 151.121.65.143 : IBM-WebExplorer-DLL/v1.1b
iii) The REFERERS log file ----------------------
The referers log file has the following structure:
[date] "sel" referer_url
Where SEL is from the request string, and the referer_url is from the
REFERER request header.
For example:
[24/Feb/1997:18:18:19 -0500] "/SAMPLES/samp1.htm" http://dh.ag.gov/i.htm
(http://dh.ag.gov/i.htm contained a link to /samples/samp1.htm)
Note: if a request does not have a REFERER request header (for example, WebEx
does not provide a REFERER request header), an entry will NOT be added to the
REFERERS log.
-- End of documentation.